<!--贷款信息详情-->
<template>
  <div class="app-container">
    <div class="save-busi-btn">
      <el-button  class="filter-item right-btn" type="primary"  @click="">
        附件</el-button>
      <el-button v-show="formData.status === '电子签约生成电子合同' "  class="filter-item right-btn" type="primary" @click="save(signStatus.order_sign_ele_ensure)">
        电子签确认</el-button>
      <el-button v-show="formData.status === '电子签约生成电子合同' " class="filter-item right-btn" type="primary" @click="save()">
        E分期补录</el-button>
      <el-button v-show="formData.status === '风控审批完成确认' " class="filter-item right-btn" type="primary" @click="save(signStatus.order_sign_ele_gen)">
        生成电子合同</el-button>
      <el-button v-show="formData.status === '待终审' " class="filter-item right-btn" type="primary" @click="save(signStatus.order_sign_image_fnauth)">
        终审</el-button>
      <el-button v-show="formData.status === '待套打' "  class="filter-item right-btn" type="primary" @click="save(signStatus.order_sign_image_print)">
        套打</el-button>
      <el-button v-show="formData.status === '待初审' "  class="filter-item right-btn" type="primary" @click="save(signStatus.order_sign_image_auth)">
        初审</el-button>
      <el-button class="filter-item right-btn" type="primary" @click="$router.go(-1)">
        关闭</el-button>
    </div>
    <el-form
      ref="mainForm"
      :model="formData"
      :rules="rules"
      size="mini"
      class="editForm"
      label-width="120px"
    >
      <!--贷款信息-->
      <el-divider content-position="left" class="part-title">贷款信息</el-divider>
      <div class="part-box">
        <el-row>
          <el-col :span="6">
            <el-form-item label="业务编号" prop="orderId" class="car-form-item">
              <el-input v-model="formData.orderId" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="证件号码" required class="car-form-item">
              <el-input v-model="mainUser.certNum" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="贷款产品"  prop="nickName" class="car-form-item">
              <el-select v-model="appInfo.loanGoods" placeholder="请选择" class="filter-item">
                <el-option v-for="item in products" :key="String(item.id)" :label="item.name" :value="String(item.id)" />
              </el-select>
            </el-form-item>

            <el-form-item label="汽车价格" required class="car-form-item">
              <el-input v-model="formData.carPrice" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="首付款" required class="car-form-item">
              <el-input v-model="appInfo.downPayment" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="首月还款" required class="car-form-item">
              <el-input v-model="appInfo.firstPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="附加费" required class="car-form-item">
              <el-input v-model="appInfo.extrafee" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="银行分期本金" required class="car-form-item">
              <el-input v-model="appInfo.bankDivideCapital" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="行驶证车主" required class="car-form-item">
              <el-input v-model="appInfo.driverUser" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="分期服务费比例" required class="car-form-item">
              <el-input v-model="appInfo.divideServiceRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="电审暂停日期" required class="car-form-item">
              <el-input v-model="appInfo.elecexamStopDate" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="客户姓名" required class="car-form-item">
              <el-input v-model="mainUser.customerName" class="car-modal-col" placeholder="请输入" disabled />
            </el-form-item>
            <el-form-item label="签约方式" required class="car-form-item">
              <el-input v-model="formData.importType" class="car-modal-col" placeholder="请输入" disabled />
            </el-form-item>
            <el-form-item label="贷款银行" prop="nickName" class="car-form-item">
              <el-select v-model="appInfo.loanBank" placeholder="请选择" clearable class="filter-item" disabled @change="getProducts">
                <el-option v-for="item in banks" :key="item.id" :label="item.bankName" :value="item.id" />
              </el-select>
            </el-form-item>
            <el-form-item label="贷款金额" required class="car-form-item">
              <el-input v-model="appInfo.loanAmount" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="首付比例" required class="car-form-item">
              <el-input v-model="appInfo.downPayRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="月还款" required class="car-form-item">
              <el-input v-model="appInfo.monthPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="附加费首月还" required class="car-form-item">
              <el-input v-model="appInfo.extrafeeFirstPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="附加费每月还" required class="car-form-item">
              <el-input v-model="appInfo.extrafeeMonthPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="车辆类型" required class="car-form-item">
              <el-select
                v-model="appInfo.carType"
                placeholder="请选择"
                clearable
                class="car-modal-col"
              >
                <el-option
                  v-for="item in carTypess"
                  :key="item.label"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="是否代购" required class="car-form-item">
              <el-select
                v-model="appInfo.daigou"
                placeholder="请选择"
                clearable
                class="car-modal-col"
              >
                <el-option
                  v-for="item in daigous"
                  :key="item.key"
                  :label="item.label"
                  :value="item.key"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="电审制单日期" required class="car-form-item">
              <el-input v-model="appInfo.elecexamMakeDate" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="证件类型" required class="car-form-item">
              <el-input v-model="mainUser.certType" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="业务部门" prop="nickName" class="car-form-item">
              <el-input v-model="formData.serviceGroup" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="按揭期限" required class="car-form-item">
              <el-select v-model="appInfo.mortgageDivide" placeholder="请选择" clearable class="filter-item">
                <el-option v-for="item in mortgageDivides" :key="item.id" :label="item.name" :value="item.id" />
              </el-select>
            </el-form-item>
            <el-form-item label="执行利率" required class="car-form-item">
              <el-input v-model="appInfo.moneyRate" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="本金首月还款" required class="car-form-item">
              <el-input v-model="appInfo.capitalFirstPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="本金每月还款" required class="car-form-item">
              <el-input v-model="appInfo.capitalMonthPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="附加费利息首月还" required class="car-form-item">
              <el-input v-model="appInfo.extrafeeRateFirstPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="附加费利息每月还" required class="car-form-item">
              <el-input v-model="appInfo.extrafeeRateMonthPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="银行分期比例" required class="car-form-item">
              <el-input v-model="appInfo.bankDivideRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="贷款申请日期" required class="car-form-item">
              <el-date-picker v-model="appInfo.loanApplyDate" class="car-modal-col" type="datetime"  value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="业务发生地" prop="nickName" class="car-form-item">
              <el-input v-model="formData.nickName" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="业务员" required class="car-form-item">
              <el-input v-model="formData.serviceUser" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="合作车商" required class="car-form-item">
              <el-select v-model="appInfo.carCooperate" placeholder="请选择" clearable class="filter-item">
                <el-option v-for="item in carCooperates" :key="item.id" :label="item.name" :value="item.id" />
              </el-select>
            </el-form-item>
            <el-form-item label="购车类型" required class="car-form-item">
              <el-select
                v-model="formData.buyType"
                placeholder="请选择"
                clearable
                disabled
                class="car-modal-col"
              >
                <el-option
                  v-for="item in carTypes"
                  :key="item.value"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="本金利息首月还" required class="car-form-item">
              <el-input v-model="appInfo.capitalRateFirstPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="本金利息每月还" required class="car-form-item">
              <el-input v-model="appInfo.capitalRateMonthPayback" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="上牌地" required class="car-form-item">
              <el-input v-model="appInfo.registration" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="汽车型号" required class="car-form-item">
              <el-input v-model="appInfo.carModel" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="牌证类型" required class="car-form-item">

              <el-select
                v-model="appInfo.registrationType"
                placeholder="请选择"
                clearable
                class="car-modal-col"
              >
                <el-option
                  v-for="item in registrationTypes"
                  :key="item.label"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="征信审核结果" required class="car-form-item">
              <el-input v-model="appInfo.creditResult" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="电审暂停内容" required class="car-form-item">
              <el-input v-model="appInfo.elecexamStopContent" disabled class="car-modal-col" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="客户综合评述" required class="car-form-item">
              <el-input v-model="risk.content"  class="car-modal-col" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="历史记录" prop="nickName" class="car-form-item">
              <ve-table
                :columns="columns"
                :table-data="tableData"
                :border-x="true"
                :border-y="true"
                :row-style-option="rowStyleOption"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <br>
      <br>
      <!--主贷人信息-->
      <el-divider content-position="left" class="part-title">主贷人信息</el-divider>
      <div class="part-box">
        <el-row>
          <el-col :span="6">
            <el-form-item label="姓名" required class="car-form-item">
              <el-input v-model="mainUser.customerName" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="性别" required class="car-form-item">
              <el-select v-model="mainUser.gender" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                <el-option v-for="item in genders" :key="item.label" :label="item.label" :value="item.label" />
              </el-select>

            </el-form-item>
            <el-form-item label="婚姻状况" required class="car-form-item">
              <el-select v-model="mainUser.marriage" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                <el-option v-for="item in marriages" :key="item.label" :label="item.label" :value="item.label" />
              </el-select>
            </el-form-item>
            <el-form-item label="单位性质" required class="car-form-item">
              <el-input v-model="mainUser.companyProperty" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="职务" required class="car-form-item">
              <el-input v-model="mainUser.job" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="手机号" required class="car-form-item">
              <el-input v-model="mainUser.phoneNum" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="家庭年收入" required class="car-form-item">
              <el-input v-model="mainUser.familyIncome" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房屋面积" required class="car-form-item">
              <el-input v-model="mainUser.houseArea" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房屋地址" required class="car-form-item">
              <el-input v-model="mainUser.houseAddr" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="紧急联系人1" required class="car-form-item">
              <el-input v-model="mainUser.contact1" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="紧急联系人1电话" required class="car-form-item">
              <el-input v-model="mainUser.contact1Phone" class="car-modal-col" placeholder="请输入" />
            </el-form-item>

          </el-col>
          <el-col :span="6">
            <el-form-item label="证件类型 " required class="car-form-item">
              <el-input v-model="mainUser.certType" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="户籍" required class="car-form-item">
              <el-input v-model="mainUser.household" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="现住地址" required class="car-form-item">
              <el-input v-model="mainUser.presentAddr" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="行业类别" required class="car-form-item">
              <el-input v-model="mainUser.trade" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="收入证明开具单位" required class="car-form-item">
              <el-input v-model="mainUser.incomeCertCom" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="收入证明开具单位地址" required class="car-form-item">
              <el-input v-model="mainUser.incomeCertComAddr" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="现住邮编" required class="car-form-item">
              <el-input v-model="mainUser.postalCode" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房屋性质" required class="car-form-item">
              <el-input v-model="mainUser.houseProperty" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="备用手机" required class="car-form-item">
              <el-input v-model="mainUser.backPhoneNum" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="联系人1与主贷人关系" required class="car-form-item">
              <el-input v-model="mainUser.contact1Related" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="联系人2与主贷人关系" prop="nickName" class="car-form-item">
              <el-input v-model="mainUser.contact2Related" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="查征日期" prop="nickName" class="car-form-item">
              <el-input v-model="mainUser.nickName" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="证件号码 " required class="car-form-item">
              <el-input v-model="mainUser.certNum" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="身份证地址" required class="car-form-item">
              <el-input v-model="mainUser.certAddr" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="单位名称" required class="car-form-item">
              <el-input v-model="mainUser.company" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="单位地址" required class="car-form-item">
              <el-input v-model="mainUser.companyAddr" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="个人月收入" required class="car-form-item">
              <el-input v-model="mainUser.monthIncome" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="单位邮编" required class="car-form-item">
              <el-input v-model="mainUser.companyPostal" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="家庭住址" required class="car-form-item">
              <el-input v-model="mainUser.nickName" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房屋所有人" required class="car-form-item">
              <el-input v-model="mainUser.houseOwner" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房主与主贷人关系" required class="car-form-item">
              <el-input v-model="mainUser.houseRelated" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="紧急联系人2" required class="car-form-item">
              <el-input v-model="mainUser.contact2" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="债务收入比(%)" prop="nickName" class="car-form-item">
              <el-input v-model="mainUser.dti" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="年龄" required class="car-form-item">
              <el-input v-model="mainUser.age" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="学历" required class="car-form-item">
              <el-input v-model="mainUser.education" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="单位职称" required class="car-form-item">
              <el-input v-model="mainUser.title" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="工作年限" required class="car-form-item">
              <el-input v-model="mainUser.workinglife" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="单位电话" required class="car-form-item">
              <el-input v-model="mainUser.companyPhone" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="家庭人数" required class="car-form-item">
              <el-input v-model="mainUser.companyPhone" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="住房情况" required class="car-form-item">
              <el-input v-model="mainUser.houseInfo" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="房屋证件" required class="car-form-item">
              <el-input v-model="mainUser.houseCert" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="车辆情况" required class="car-form-item">
              <el-input v-model="mainUser.carInfo" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="紧急联系人2手机号" prop="nickName" class="car-form-item">
              <el-input v-model="mainUser.contact2Phone" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="征信结果说明" prop="nickName" class="car-form-item">
              <el-input v-model="formData.nickName" class="car-modal-col" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <br>
      <br>
      <br>
      <br>
      <!--担保人/配偶信息-->
      <template>
        <div v-for="(item, index) in authUsers">
          <el-divider content-position="left" class="part-title">{{ item.serviceType }}信息</el-divider>
          <div class="part-box">
            <el-row>
              <el-col :span="6">
                <el-form-item disabled label="姓名" class="car-form-item">
                  <el-input v-model="authUsers[index].customerName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="性别" required class="car-form-item">
                  <el-select v-model="authUsers[index].gender" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                    <el-option v-for="item in genders" :key="item.label" :label="item.label" :value="item.label" />
                  </el-select>
                </el-form-item>
                <el-form-item label="婚姻状况" required class="car-form-item">
                  <el-select v-model="authUsers[index].marriage" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                    <el-option v-for="item in marriages" :key="item.label" :label="item.label" :value="item.label" />
                  </el-select>
                </el-form-item>
                <el-form-item label="手机号码" class="car-form-item">
                  <el-input v-model="authUsers[index].phoneNum" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="单位邮编" class="car-form-item">
                  <el-input v-model="authUsers[index].companyPostal" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="家庭住址" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="征信结果" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item disabled label="证件类型" class="car-form-item">
                  <el-input v-model="authUsers[index].certType" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="户籍" class="car-form-item">
                  <el-input v-model="authUsers[index].household" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="现住地址" class="car-form-item">
                  <el-input v-model="authUsers[index].presentAddr" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="职务" class="car-form-item">
                  <el-input v-model="authUsers[index].job" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="个人月收入" class="car-form-item">
                  <el-input v-model="authUsers[index].monthIncome" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="住房情况" fclass="car-form-item">
                  <el-input v-model="authUsers[index].houseProperty" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="查征日期" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item disabled label="证件号码" class="car-form-item">
                  <el-input v-model="authUsers[index].certNum" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="身份证地址" prop="certAddr" class="car-form-item">
                  <el-input v-model="authUsers[index].certAddr" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="实际单位" class="car-form-item">
                  <el-input v-model="authUsers[index].company" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="工作年限" class="car-form-item">
                  <el-input v-model="authUsers[index].workinglife" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="家庭人均收入" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="家庭人数" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="年龄" class="car-form-item">
                  <el-input v-model="authUsers[index].age" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="学历" class="car-form-item">
                  <el-input v-model="authUsers[index].education" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="单位地址" class="car-form-item">
                  <el-input v-model="authUsers[index].companyAddr" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="单位电话" class="car-form-item">
                  <el-input v-model="authUsers[index].companyPhone" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="现住邮编" class="car-form-item">
                  <el-input v-model="authUsers[index].postalCode" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
                <el-form-item label="备用手机" class="car-form-item">
                  <el-input v-model="authUsers[index].backPhoneNum" class="car-modal-col" placeholder="请输入" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="征信结果说明" class="car-form-item">
                  <el-input v-model="authUsers[index].nickName" class="car-modal-col" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入" />
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <br>
          <br>
        </div>
      </template>
      <!--车辆信息-->
      <el-divider content-position="left" class="part-title">车辆信息</el-divider>
      <div class="part-box">
        <el-row>
          <el-col :span="12">
            <el-form-item label="车型" required class="car-form-item">
              <el-input v-model="car.type" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="座位数" required class="car-form-item">
              <el-input v-model="car.sites" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="车辆构成" required class="car-form-item">
              <el-select v-model="car.jointStock" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                <el-option v-for="item in jointStocks" :key="item.label" :label="item.label" :value="item.label" />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="初次上牌日期" required class="car-form-item">
              <el-date-picker v-model="car.registrationTime" class="car-modal-col" type="datetime" placeholder="请选择" />
            </el-form-item>
            <el-form-item label="上牌地" required class="car-form-item">
              <el-input v-model="appInfo.registration" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="贷款机构" required class="car-form-item">
              <el-select v-model="appInfo.loanBank" disabled placeholder="请选择" clearable class="filter-item" @change="getProducts">
                <el-option v-for="item in banks" :key="item.id" :label="item.bankName" :value="item.id" />
              </el-select>
            </el-form-item>
            <el-form-item label="车价" required class="car-form-item">
              <el-input v-model="appInfo.carPrice" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="实际首付比例" required class="car-form-item">
              <el-input v-model="car.downPayRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="申请分期付款总额" required class="car-form-item">
              <el-input v-model="car.applyDivideAmount" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="评估价" required class="car-form-item">
              <el-input v-model="car.evaluate" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="是否公牌" required class="car-form-item">
              <el-select v-model="car.ispublic" placeholder="请选择" clearable class="filter-item" @change="getProducts">
                <el-option v-for="item in ispublics" :key="item.key" :label="item.label" :value="item.key" />
              </el-select>
            </el-form-item>
            <el-form-item label="贷款年限" required class="car-form-item">
              <el-input v-model="appInfo.mortgageDivide" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="贷款额" required class="car-form-item">
              <el-input v-model="appInfo.loanAmount" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="实际贷款比例" required class="car-form-item">
              <el-input v-model="car.loanRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="分期付款总额" required class="car-form-item">
              <el-input v-model="car.divideAmount" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="评估日期" required class="car-form-item">
              <el-date-picker v-model="car.evaluateTime" class="car-modal-col" type="datetime" placeholder="请选择" />
            </el-form-item>
            <el-form-item label="行驶证车主" required class="car-form-item">
              <el-input v-model="appInfo.driverUser" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="产品类型" required class="car-form-item">
              <el-input v-model="car.productType" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="公司费率" required class="car-form-item">
              <el-input v-model="appInfo.moneyRate" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="综合服务费比例" prop="nickName" class="car-form-item">
              <el-input v-model="car.loanRatio" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="首月还款额" required class="car-form-item">
              <el-input v-model="appInfo.firstPayback" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="出报告金额" required class="car-form-item">
              <el-input v-model="car.reportPrice" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="产品编号" required class="car-form-item">
              <el-input v-model="car.productId" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="银行利率" required class="car-form-item">
              <el-input v-model="appInfo.moneyRate" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="实际首付款" required class="car-form-item">
              <el-input v-model="car.downPayment" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="综合服务费" required class="car-form-item">
              <el-input v-model="car.serviceFee" class="car-modal-col" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="月还款额" required class="car-form-item">
              <el-input v-model="appInfo.monthPayback" disabled class="car-modal-col" placeholder="请输入" />
            </el-form-item>

          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注" required class="car-form-item">
              <el-input v-model="car.remark" class="car-modal-col" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <br>
      <br>
      <!--车辆信息补录-->
      <el-divider content-position="left" class="part-title">车辆信息补录</el-divider>
      <el-row class="part-box">
        <el-col :span="6">
          <el-form-item label="车辆类型" prop="nickName" class="car-form-item">
            <el-select
              v-model="appInfo.carType"
              placeholder="请选择"
              clearable
              disabled
              class="car-modal-col"
            >
              <el-option
                v-for="item in carTypess"
                :key="item.label"
                :label="item.label"
                :value="item.label"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="车辆颜色" required class="car-form-item">
            <el-input v-model="car.carColor" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="底盘号后六位" required class="car-form-item">
            <el-input v-model="car.chassis" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="主贷人的新车牌号" required class="car-form-item">
            <el-input v-model="car.newBrand" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="具体车型" required class="car-form-item">
            <el-input v-model="car.specialType" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="车架号" required class="car-form-item">
            <el-input v-model="car.vin" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="发动机号" required class="car-form-item">
            <el-input v-model="car.engineCode" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="发票开具单位" required class="car-form-item">
            <el-input v-model="car.billCompany" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="发票号" required class="car-form-item">
            <el-input v-model="car.billCode" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
          <el-form-item label="初始登记时间" required class="car-form-item">
            <el-date-picker v-model="car.initTime" class="car-modal-col" type="datetime" placeholder="请选择" />

          </el-form-item>
          <el-form-item label="开票日期" required class="car-form-item">
            <el-input v-model="car.billTime" class="car-modal-col" placeholder="请输入" />
          </el-form-item>
        </el-col>
      </el-row>
      <br>
      <br>
    </el-form>
  </div>
</template>
<script>
const DB_DATA = []
export default {
  data() {
    return {
      appId: '',
      id: '',
      newDialog: false,
      formData: {},
      mainUser: {}, // 主贷人
      authUsers: [], // 担保人/配偶信息
      car: {},
      risk: {},
      appInfo: {},
      banks: [],
      products: [],
      carCooperates: [],
      signTypeList:[],
      signType:1,
      carTypes: [{ value: 0, label: '新车' }, { value: 1, label: '二手车' }], // 车辆类型
      mortgageDivides: [{ id: 24, name: 24 }, { id: 36, name: 36 }, { id: 48, name: 48 }, { id: 60, name: 60 }],
      carTypess: [{ key: 0, label: '轿车' }, { key: 1, label: '越野车' }, { key: 2, label: '商务车' }, { key: 3, label: '跑车' }],
      calendarTypeOptions: [{ key: '选择' }],
      daigous: [{ key: true, label: '是' }, { key: false, label: '否' }],
      registrationTypes: [{ key: 0, label: '公牌' }, { key: 1, label: '私牌' }],
      genders: [{ key: 0, label: '男' }, { key: 1, label: '女' }],
      marriages: [{ key: 0, label: '未婚' }, { key: 0, label: '已婚' }, { key: 0, label: '离婚' }, { key: 0, label: '丧偶' },
        { key: 0, label: '分居' }, { key: 0, label: '未知' }],
      jointStocks: [{ key: 0, label: '国产' }, { key: 1, label: '进口' }, { key: 2, label: '合资' }],
      ispublics: [{ key: 0, label: '是' }, { key: 1, label: '否' }],
      dialogImageUrl: '',
      dialogVisible: false,
      disabled: false,
      rowStyleOption: { // 表格样式
        stripe: true, // 斑马纹
        hoverHighlight: true, // hover高亮
        clickHighlight: true // 点击行高亮
      },
      // page index
      pageIndex: 1,
      // page size
      pageSize: 10,
      rules: {},
      columns: [
        {
          field: '',
          key: 'a',
          title: '编号',
          align: 'center',
          renderBodyCell: ({ row, column, rowIndex }, h) => {
            return (this.pageIndex - 1) * this.pageSize + rowIndex + 1
          }
        },
        { field: 'name', key: 'b', title: '审核人', align: 'center' },
        { field: 'date', key: 'c', title: '审核意见', align: 'left' },
        { field: 'hobby', key: 'd', title: '审核日期', align: 'left' },
        { field: 'address', key: 'e', title: '审核节点', width: '' }
      ],
      signStatus:{//签约状态
        order_sign_image_send:"order_sign_image_send",//待寄送
        order_sign_image_receive:"order_sign_image_receive",//待收件
        order_sign_image_auth:"order_sign_image_auth",//待初审
        order_sign_image_print:"order_sign_image_print",//待套打
        order_sign_image_fnauth:"order_sign_image_fnauth",//待终审
        order_sign_image_attach:"order_sign_image_attach",//影像件附件上传
        order_sign_ele_gen:"order_sign_ele_gen",//待生成电子合同
        order_sign_ele_supp:"order_sign_ele_supp",//E分期补录
        order_sign_ele_ensure:"order_sign_ele_ensure",//待确认
      }
    }
  },
  computed: {
    // table data
    tableData() {
      const { pageIndex, pageSize } = this
      return DB_DATA.slice((pageIndex - 1) * pageSize, pageIndex * pageSize)
    }
  },
  created() {
    this.appId = sessionStorage.getItem('appId')
    if (this.$route.query && this.$route.query.source === 'signManagerList') {
      this.id = this.$route.query.id
      this.sourceFrom = this.$route.query.source
      this.initDatabase(this.$route.query.id)
    }
    this.getProducts()
    this.getBankList()
    this.getCarCooperates()
    this.$set()
  },
  methods: {
    handleRemove(file) {
      console.log(file)
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url
      this.dialogVisible = true
    },
    handleDownload(file) {
      console.log(file)
    },
    /**
     * 获取经销商列表数据
     * @date 2021-05-18
     */
    async getCarCooperates() {
      const param = { appId: await sessionStorage.getItem('appId') }
      const data = await this.$http.post('/auth/distributor/listAll', param)
      if (data.code === 200) {
        this.carCooperates = data.data
      }
    },
    /**
     * 获取银行产品列表数据
     * @date 2021-05-18
     */
    async getProducts() {
      const param = { appId: await sessionStorage.getItem('appId'), bankId: this.appInfo.loanBank }
      const data = await this.$http.post('/auth/bankProduct/listAll', param)
      console.log("获取银行产品：",data.data);
      if (data.code === 200) {
        this.products = data.data
      }

    },
    /**
     * 获取银行列表数据
     * @date 2021-05-18
     */
    async getBankList() {
      const param = { appId: await sessionStorage.getItem('appId') }
      const data = await this.$http.post('/auth/bankSetup/listAll', param)
      if (data.code === 200) {
        this.banks = data.data
      }
    },
    /**
     * 获取征信单详情
     * @date 2021/7/6
     */
    async initDatabase(id) {
      const data = await this.$http.get('/flow/signManagement/detail/' + id, {})
      if (data.code === 200) {
        console.log(data.data);
        this.formData = data.data.orders
        this.mainUser = data.data.mainUser
        this.authUsers = data.data.authUsers
        if (data.data.approveInfo) {
          this.appInfo = data.data.approveInfo
        }
        if (data.data.car) {
          this.car = data.data.car
        }
        if (data.data.risk){
          this.risk = data.data.risk
        }
      }
    },

    async save(code) {
      let param = {orderId:this.formData.id,code:code}
      this.$prompt("请输入备注信息", "备注", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        inputValue: param.remark,
        inputPattern: /\S/
      }).then(res => {param.remark = res.value})

      const data = await this.$http.post('/flow/signManagement/save',param)
      if (data.code === 200) {
        this.$message({
          type: 'success',
          message: '保存成功！'
        })
        this.initDatabase(this.id);
      }else{
        this.$message({
          type: 'fail',
          message: '未保存成功！'
        })
      }
      $router.go(-1);
    },

    async submit() {
      if (this.formData.status != "待贷款信息确认") {
        this.$message({
          type: 'error',
          message: '请先保存审核单信息'
        })
        return
      }
      const data = await this.$http.get('/flow/approveInfo/submit/' + this.id, '')
      if (data.code === 200) {
      }
    }
  }
}
</script>
<style lang="scss" scoped>

.app-container {
  width: 98%;
  margin: 0 auto 0;
  .save-busi-btn{
    overflow: hidden;
  }
  .btn-box {
    width: 100%;
    text-align: right;
    margin: 10px auto;
  }
  .part-title {
    margin: 0 0 0;
    font-size: 18px;
    font-weight: bold;
    .el-divider__text{
      font-size: inherit;
    }
  }
  .right-btn{
    float: right;
    margin: 0 0 10px 10px;
  }
  .part-box {
    padding: 20px 15px 0 0;
    border-left: 1px solid #d3d6dd;
    border-right: 1px solid #d3d6dd;
    border-bottom: 1px solid #d3d6dd;
    .upload-box {
      margin-left: 10px;
      margin-bottom: 10px;
    }
  }
  .part-title-box{
    height: 35px;
    background-color: #ecf8ff;
    border-radius: 4px;
    border-left: 5px solid #50bfff;
    margin: 20px auto;
    text-align: center;
    .part-tip{
      font-size: 14px;
      text-align: center;
      line-height: 35px;

    }
  }
}
.dialog-app-container {
  width: 100%;
  margin: -60px auto 0;
}
</style>
